package com.wang.dao;

import com.wang.pojo.User;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

public class UserMapperImpl extends SqlSessionDaoSupport implements UserMapper{
    public List<User> getuser() {
        User user=new User("9","q",45);
        insertuser(user);
        deletuser(user.getId());
        return getSqlSession().getMapper(UserMapper.class).getuser();
    }

    public void insertuser(User user) {
        getSqlSession().getMapper(UserMapper.class).insertuser(user);
    }

    public void deletuser(String id) {
        getSqlSession().getMapper(UserMapper.class).deletuser(id);
    }
}
